package cn.com.jinhao.provider.business.mapper;


import cn.com.jinhao.hotline.commons.base.BaseMapper;
import cn.com.jinhao.hotline.commons.vo.business.HistoryDispatchResponseVO;
import cn.com.jinhao.provider.business.entity.Dispatch;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author Shane
 * @date 2019-10-16
 */
@Repository
public interface DispatchMapper extends BaseMapper<Dispatch> {
    /**
     * 根据事件编号查询历史派单信息
     *
     * @param eventCode 事件编码
     * @return List
     */
    @Select("SELECT BT$EVIF_CODE as eventCode,CODE,STAT as status,ISLD as isMain,EVAS as eventDescription,ST$DEPT_CODE_B as organizerCode,ST$DEPT_DEPT_B as organizerName FROM BT$EVAS WHERE BT$EVIF_CODE=#{eventCode}")
    List<HistoryDispatchResponseVO> selectHistory(@Param("eventCode") String eventCode);
}
